package com.broadengate.dao.impl;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import com.broadengate.dao.CurrencyDao;
import com.broadengate.model.Currency;

/******
 * 提供币种与数据库的交互方法
 * 方法主要有findCurrencyByName()从币种名得到币种对象
 */
public class CurrencyDaoImpl extends HibernateDaoSupport implements CurrencyDao {	
		public Currency findCurrencyByName(String name){
			return (Currency)getHibernateTemplate().find("from Currency currency where currency.name='"+name+"'").get(0);	
		}
}


